﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Game.model.@base
{
    public class AcquireType
    {
        private int _id;
        public AcquireType(int id)
        {
            _id = id;
        }
        public static readonly AcquireType NORMAL=new AcquireType(0);
	    public static readonly AcquireType FISHING=new AcquireType(1);
	    public static readonly AcquireType CLAN=new AcquireType(2);
	    public static readonly AcquireType SUB_UNIT=new AcquireType(3);
	    public static readonly AcquireType TRANSFORMATION=new AcquireType(4);
	    public static readonly AcquireType CERTIFICATION=new AcquireType(5);
	    public static readonly AcquireType DUAL_CERTIFICATION=new AcquireType(6);
	    public static readonly AcquireType COLLECTION=new AcquireType(7);
	    public static readonly AcquireType TRANSFER_CARDINAL=new AcquireType(8);
	    public static readonly AcquireType TRANSFER_EVA_SAINTS=new AcquireType(9);
        public static readonly AcquireType TRANSFER_SHILLIEN_SAINTS = new AcquireType(10);
        public IEnumerable<AcquireType> Values
        {
            get
            {
                yield return NORMAL;
                yield return FISHING;
                yield return CLAN;
                yield return SUB_UNIT;
                yield return TRANSFORMATION;
                yield return CERTIFICATION;
                yield return DUAL_CERTIFICATION;
                yield return COLLECTION;
                yield return TRANSFER_CARDINAL;
                yield return TRANSFER_EVA_SAINTS;
                yield return TRANSFER_SHILLIEN_SAINTS;
            }
        }
        public static AcquireType transferType(int classId)
        {
            switch (classId)
            {
                case 97:
                    return TRANSFER_CARDINAL;
                case 105:
                    return TRANSFER_EVA_SAINTS;
                case 112:
                    return TRANSFER_SHILLIEN_SAINTS;
            }
            return null;
        }
        public int transferClassId()
        {
            foreach (var acquireType in Values)
            {
                switch (acquireType._id)
                {
                    case 8:
                        return 97;
                    case 9:
                        return 105;
                    case 10:
                        return 112;
                }
            }
           
            return 0;
        }
    }
}
